package java7_26;

import java.util.InputMismatchException;

public class Students {
	private int id;
	private int age;
	private String name;
	
	public  void setName(String name){
		this.name=name;
	}
	public void setId(int id){
		this.id=id;
	}
	public void setAge(int age) throws ageException{
		
			if(age<18||age>25){
				throw new ageException();
		}
		this.age=age;
	}
	public int getId(){
		return id;
	}
	public String getName(){
		return name;
	}
	public int getAge(){
		return age;
	}
}

